<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="schoolList.title"/></title>
    <meta name="heading" content="<fmt:message key='schoolList.heading'/>"/>
</head>

<c:set var="buttons">
    <input type="button" style="margin-right: 5px"
        onclick="location.href='<c:url value="/school/edit.html"/>'"
        value="<fmt:message key="button.add"/>"/>
    
    <input type="button" onclick="location.href='<c:url value="/mainMenu.html"/>'"
        value="<fmt:message key="button.done"/>"/>
</c:set>

<c:out value="${buttons}" escapeXml="false" />
<s:set name="schools" value="schools" scope="request"/>
<display:table name="schools" class="table" requestURI="" id="schoolList" export="true" pagesize="25">
    <display:column property="id" sortable="true" href="edit.html" 
        paramId="id" paramProperty="id" titleKey="school.id" style="width: 10%"/>
    <display:column property="name" sortable="true" titleKey="school.name" style="width: 25%"/>
    <display:column property="address" sortable="true" titleKey="school.address.address" style="width: 25%"/>
    
    <display:setProperty name="paging.banner.item_name" value="school"/>
    <display:setProperty name="paging.banner.items_name" value="schools"/>

    <display:setProperty name="export.excel.filename" value="school List.xls"/>
    <display:setProperty name="export.csv.filename" value="school List.csv"/>
    <display:setProperty name="export.pdf.filename" value="school List.pdf"/>


<s:iterator value="schools" id="school">
	<li>
	<display:setProperty name="paging.banner.item_name" value="school" /> 
	<display:setProperty name="paging.banner.items_name" value="schools" />
	</li>
</s:iterator>
</display:table>
<c:out value="${buttons}" escapeXml="false" />

<script type="text/javascript">
    highlightTableRows("schoolList");
</script>